// Copyright 2019 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// AUTOGENERATED. DO NOT EDIT.

goog.provide('goog.html.htmlTestVectors');
goog.setTestOnly();

goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
    {input: "<body onload=alert('xss')>",
     acceptable: [
         "",
     ],
     name: "body_onload"},
    {input: "<iframe src=\"javascript:alert('xss')\">",
     acceptable: [
         "<iframe></iframe>",
         "",
     ],
     name: "iframe_src"},
    {input: "<img src=\"javascript:xss=true;\">",
     acceptable: [
         "<img src=\"javascript:void(0);\">",
         "<img src=\"about:invalid#zGoSafez\"/>",
         "<img src=\"about:invalid#zCSafez\">",
         "<img>",
         "<img />",
     ],
     name: "img"},
    {input: "<img \"\"\"><script>alert('xss')</script>\">",
     acceptable: [
         "<img/>&#34;&gt;",
         "<img>&quot;&gt;",
         "<img>\"&gt;",
         "<img />\"&gt;",
     ],
     name: "img_malformed"},
    {input: "<img src=x onerror=\"alert('xxs')\">",
     acceptable: [
         "<img src=\"x\"/>",
         "<img src=\"x\">",
         "<img src=x>",
         "<img src=\"javascript:void(0);\">",
         "<img />",
     ],
     name: "img_onerror"},
    {input: "<img src=javascript:alert(&quot;XSS&quot;)>",
     acceptable: [
         "<img src=\"javascript:void(0);\">",
         "<img src=\"about:invalid#zGoSafez\"/>",
         "<img src=\"about:invalid#zCSafez\">",
         "<img>",
         "<img />",
     ],
     name: "img_quot"},
    {input: "<style type=\"text/javascript\">alert('xss');</style>",
     acceptable: [
         "",
     ],
     name: "img_style"},
    {input: "<img src=\"jav&#x09;ascript:alert('xss');\">",
     acceptable: [
         "<img src=\"javascript:void(0);\">",
         "<img src=\"about:invalid#zGoSafez\"/>",
         "<img src=\"about:invalid#zCSafez\">",
         "<img>",
         "<img />",
     ],
     name: "img_tab"},
    {input: "<input type=\"image\" src=\"javascript:alert('xss');\">",
     acceptable: [
         "",
         "<input type=\"image\">",
         "<input type=\"image\" />",
     ],
     name: "input"},
    {input: "javascript:/*--></title></style></textarea></script></xmp><svg/onload='+/\"/+/onmouseover=1/+/[*/[]/+alert(xss)//'>",
     acceptable: [
         "javascript:/*--&gt;",
     ],
     name: "polygot"},
    {input: "<LINK REL=\"stylesheet\" HREF=\"http://google.com/xss.css\">",
     acceptable: [
         "<link rel=\"stylesheet\"/>",
         "<link rel=stylesheet>",
         "",
     ],
     name: "remote_stylesheet"},
    {input: "<STYLE>@import'http://google.com/xss.css';</STYLE>",
     acceptable: [
         "",
     ],
     name: "remote_stylesheet2"},
    {input: "<script>alert('xss')</script>",
     acceptable: [
         "",
     ],
     name: "script_alert"},
    {input: "<<script>alert('xss');//<</script>",
     acceptable: [
         "&lt;",
     ],
     name: "script_extra"},
    {input: "<<s<script>script>alert()<</script>/script>",
     acceptable: [
         "&lt;",
         "&lt;script&gt;alert()&lt;/script&gt;",
         "&lt;<span>script&gt;alert()&lt;/script&gt;</span>",
     ],
     name: "script_inception"},
    {input: "<script/xss src=\"http://google.com/xss.js\"><\\/script>",
     acceptable: [
         "",
     ],
     name: "script_nondigit"},
    {input: "<script src=\"http://google.com/xss.js\"< b >",
     acceptable: [
         "",
     ],
     name: "script_open"},
    {input: "<script src=\"http://google.com/xss.js\"></script>",
     acceptable: [
         "",
     ],
     name: "script_src"},
    {input: "</title><script>alert();</script>",
     acceptable: [
         "",
     ],
     name: "script_title"},
    {input: "<img src=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>",
     acceptable: [
         "<img src=\"javascript:void(0);\">",
         "<img src=\"about:invalid#zGoSafez\"/>",
         "<img src=\"about:invalid#zCSafez\">",
         "<img>",
         "<img />",
     ],
     name: "unicode"},
];
